package com.ruirui.demo;

import reactor.core.publisher.Flux;

public class FluxBuffer {
    public static void main(String[] args) throws InterruptedException {

        Flux<Integer> flux = Flux.just(1, 2, 3, 4, 5);
        // 一次投放三个数据
        flux.buffer(3)
                .log()
                .subscribe(e -> System.out.println("e1:" + e));
        // 一次投放一个数据
        flux.log()
                .subscribe(e -> System.out.println("e2:" + e));

    }


}
